Systems and methods for terrain variation detection

ABSTRACT

In one aspect, a method for detecting terrain variations within a field includes receiving one or more images depicting an imaged portion of an agricultural field. The method also includes classifying a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels with each soil pixel being associated with a respective pixel height. Additionally, the method includes identifying each soil pixel having a pixel height that exceeds a height threshold as a candidate ridge pixel and each soil pixel having a pixel height that is less than a depth threshold as a candidate valley pixel. The method further includes determining whether a ridge or a valley is present within the imaged portion of the agricultural field based at least in part on the candidate ridge pixels or the candidate valley pixels.

FIELD OF THE INVENTION

The present subject matter relates generally to the acquisition and analysis of surface condition data associated with an agricultural field and, more particularly, to systems and methods for detecting terrain variations within a field.

BACKGROUND OF THE INVENTION

Terrain variation generally refers to ridges, valleys, and/or other surface irregularities that may exist within a soil surface of an agricultural field, which may be the result of a given agricultural operation, such as a harvesting operation or a tillage operation. For various reasons, it is important to maintain the terrain variations within a general range of heights and/or depths. Specifically, terrain variations may help with draining various soils, warming of the soil at planting time, and allowing for more efficient planting. However, in some cases, an excessive amount of terrain variation within a field can have a negative effect on the soil's productivity potential, such as by drying out the soil and/or by increasing soil erosion issues. As such, the ability to monitor and/or adjust the terrain variations remaining within a field can be very important to maintaining a healthy, productive field, particularly when it comes to performing tillage operations.

In this regard, vision-based systems have been previously developed that can be used to detect terrain variations within images, thereby allowing for a notification that a variation has been detected. However, these systems typically only provide a binary output (i.e., uneven ground vs even ground). In other words, in relation to the images being analyzed, conventional systems are only equipped to classify pixels as even or uneven. As the industry advances towards more automated solutions, including fully automated agricultural machines (e.g., fully automated tractors and implements), it is generally desirable to be able to obtain more detailed information about the surface conditions within a field, such as additional information regarding the terrain variations of the soil surface, to aid in the generation of computer-implemented control actions that improve the operation and/or efficiency of an agricultural machine performing an operation within a field.

Accordingly, a system and method for detecting terrain variations within a field would be welcomed in the technology.

BRIEF DESCRIPTION OF THE INVENTION

Aspects and advantages of the invention will be set forth in part in the following description, or may be obvious from the description, or may be learned through practice of the invention.

In one aspect, the present subject matter is directed to a method for detecting terrain variations within a field. the method includes receiving, with a computing system, one or more images depicting an imaged portion of an agricultural field, the imaged portion of the agricultural field being at least partially represented by a plurality of pixels within the one or more images. The method also includes classifying, with the computing system, a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels, each soil pixel being associated with a respective pixel height. The method further includes identifying, with the computing system, each soil pixel having a pixel height that exceeds a height threshold as a candidate ridge pixel. In addition, the method includes identifying, with the computing system, each soil pixel having a pixel height that is less than a depth threshold as a candidate valley pixel. Further, the method includes determining, with the computing system, whether a ridge is present within the imaged portion of the agricultural field based at least in part on the candidate ridge pixels. Lastly, the method includes determining, with the computing system, whether a valley is present within the imaged portion of the agricultural field based at least in part on the candidate valley pixels.

In another aspect, the present subject matter is directed to a system for detecting terrain variations within a field. The system includes an imaging device configured to capture one or more images depicting an imaged portion of an agricultural field, with the imaged portion of the agricultural field being at least partially represented by a plurality of pixels within the one or more images. The system also includes a computing system communicatively coupled to the imaging device. The computing system includes a processor and associated memory, with the memory storing instructions that, when implemented by the processor, configure the computing system to receive the one or more images from the imaging devices, classify a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels, identify each soil pixel having a pixel height that exceeds a pixel height threshold as a candidate ridge pixel, and determine whether a ridge is present within the imaged portion of the agricultural field based at least in part on the candidate ridge pixels.

In another aspect, the present subject matter is directed to a system for detecting terrain variations within a field. The system includes an imaging device configured to capture one or more images depicting an imaged portion of an agricultural field, with the imaged portion of the agricultural field being at least partially represented by a plurality of pixels within the one or more images. The system also includes a computing system communicatively coupled to the imaging device. The computing system includes a processor and associated memory, with the memory storing instructions that, when implemented by the processor, configure the computing system to receive the one or more images from the imaging devices, classify a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels, identify each soil pixel having a pixel depth that exceeds a pixel depth threshold as a candidate valley pixel, and determine whether a valley is present within the imaged portion of the agricultural field based at least in part on the candidate valley pixels.

These and other features, aspects and advantages of the present invention will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

A full and enabling disclosure of the present invention, including the best mode thereof, directed to one of ordinary skill in the art, is set forth in the specification, which makes reference to the appended figures, in which:

FIG. 1 illustrates a perspective view of an agricultural machine in accordance with aspects of the present subject matter, particularly illustrating the agricultural machine including imaging devices for capturing images of a field across which the machine is being traversed;

FIG. 2 illustrates a schematic view of a system for detecting terrain variations within a field in accordance with aspects of the present subject matter;

FIGS. 3-5 illustrate a flow diagram providing example control logic for detecting terrain variations within imaged portions of a field in accordance with aspects of the present subject matter;

FIG. 6 illustrates an example residue mask that identifies “residue pixels” (as opposed to “soil pixels”) within an image of a field in accordance with aspects of the present subject matter;

FIG. 7 illustrates an example of a soil mask shown in FIG. 6 in which all the “soil pixels” with pixel heights exceeding a given height threshold have been identified as candidate ridge pixels in accordance with aspects of the present subject matter;

FIGS. 8-11 illustrate a convoluted image of an identified ridge and direction verification images in the form of copies of the convoluted image that are offset from the convoluted image to determine a general direction of the ridge;

FIG. 12 illustrates an example of the soil mask shown in FIG. 6 in which all the “soil pixels” with pixel heights that exceed a given depth threshold have been identified as candidate valley pixels in accordance with aspects of the present subject matter;

FIGS. 13-16 illustrate a convoluted image of an identified valley and direction verification images in the form of copies of the convoluted image that are offset from the convoluted image to determine a general direction of the valley;

FIG. 17 illustrates a flow diagram providing example control logic for generating slope-corrected depth images in accordance with aspects of the present subject matter;

FIG. 18 illustrates an example of an image having a residue mask, a stem mask, and a soil mask with the image divided into four segments;

FIG. 19 illustrates a slope plane that is interpolated with a depth image of the field to generate a slope-corrected depth image; and

FIG. 20 illustrates a flow diagram of a method for detecting terrain variations within a field in accordance with aspects of the present subject matter.

DETAILED DESCRIPTION OF THE INVENTION

Reference now will be made in detail to embodiments of the invention, one or more examples of which are illustrated in the drawings. Each example is provided by way of explanation of the invention, not limitation of the invention. In fact, it will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the scope or spirit of the invention. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present invention covers such modifications and variations as come within the scope of the appended claims and their equivalents.

In this document, relational terms, such as first and second, top and bottom, and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms “comprises,” “comprising,” or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element preceded by “comprises” does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

As used herein, the term “and/or,” when used in a list of two or more items, means that any one of the listed items can be employed by itself, or any combination of two or more of the listed items can be employed. For example, if a composition is described as containing components A, B, and/or C, the composition can contain A alone; B alone; C alone; A and B in combination; A and C in combination; B and C in combination; or A, B, and C in combination.

In general, the present subject matter is directed to systems and methods for detecting terrain variations within an agricultural field. As will be described below, a terrain variation is generally characterized by a valley (e.g., a void within a portion of a field below a nominal height of the soil surface having at least a predefined volume), a ridge (e.g., an amount of soil that extends above a nominal height of the soil surface within a portion of a field having at least a predefined volume), or other surface irregularities that extends above or below a nominal height of the soil surface or other reference point or plane by a given height. For example, when the soil is uniform, there are generally no terrain variations across the soil surface. However, as terrain variations occur in localized areas, the height of the ridge is generally greater than the nominal height of the soil surface and/or the depth of the valley is generally exceeds the nominal height of the soil surface. Such terrain variations can result in an undesirable circumstances that can impact subsequent agricultural operations within the field (e.g., a subsequent planting operation).

In accordance with aspects of the present subject matter, the disclosed systems and methods utilize computer vision techniques and/or image processing algorithms to detect terrain variations within imaged portions of an agricultural field. Specifically, in several embodiments, one or more imaging devices (e.g., a stereo camera assembly) are used to capture images of the field that: (1) allow the pixels within each image to be classified as residue or soil; and (2) provide depth information associated with the distance from the imaging device(s) to imaged surface features of the field (e.g., the soil surface, residue, etc.), which can then be translated to a height of such features above a given reference plane (e.g., a reference plane approximating the soil surface). By obtaining such depth information, the pixels classified as soil (versus residue) can be evaluated to identify any of such pixels that have an associated pixel height (e.g., relative to the reference plane or height) that exceeds a given height threshold or a given depth threshold. As used herein, the pixel height may be used to describe the length that the pixel extends from a reference plane in a first direction (e.g., above a nominal height of the soil surface or a reference plane), which may be compared to a height threshold. Further, the pixel height may also be used to describe the length that the pixel extends from a reference plane in a second direction (e.g., below a nominal height of the soil surface or a reference plane), which may be compared to a depth threshold. For example, if a pixel height is 10 millimeters (mm), the pixel extends 10 mm above the reference plane and if a pixel height is −10 mm, the pixel extends 10 mm below the reference plane.

In some embodiments, the volume associated with the soil pixels having a pixel height exceeding the height threshold can then be evaluated to determine whether a ridge is present within the imaged portion of the field. For instance, if the ridge volume exceeds a predetermined ridge volume threshold, it may be determined that a ridge has been detected. Likewise, in some embodiments, the volume associated with the soil pixels having a pixel height exceeding the depth threshold can be evaluated to determine whether a valley is present within the imaged portion of the field. For instance, if the valley volume exceeds a predetermined valley volume threshold, it may be determined that a valley has been detected.

Referring now to drawings, FIG. 1 illustrates a perspective view of an agricultural machine 10 in accordance with various aspects of the present subject matter. As shown, in the illustrated embodiment, the agricultural machine 10 includes a work vehicle 12 and an associated agricultural implement 14. In general, the work vehicle 12 is configured to tow the implement 14 across a field in a direction of travel (e.g., as indicated by arrow 16 in FIG. 1 ). In the illustrated embodiment, the work vehicle 12 is configured as an agricultural tractor and the implement 14 is configured as an associated tillage implement. However, in other embodiments, the work vehicle 12 may be configured as any other suitable type of vehicle, such as an agricultural harvester, a self-propelled sprayer, and/or the like. Similarly, the implement 14 may be configured as any other suitable type of implement, such as a planter. Furthermore, it should be appreciated that the agricultural machine 10 may correspond to any suitable powered and/or unpowered agricultural machine (including suitable vehicles and/or equipment, such as only a work vehicle or only an implement). Additionally, the agricultural machine 10 may include two or more associated vehicles, implements, and/or the like (e.g., a tractor, a planter, and an associated air cart).

As shown in FIG. 1 , the work vehicle 12 includes a pair of front track assemblies 18, a pair or rear track assemblies 20, and a frame or chassis 22 coupled to and supported by the track assemblies 18, 20. An operator's cab 24 may be supported by a portion of the chassis 22 and may house various input devices for permitting an operator to control the operation of one or more components of the work vehicle 12 and/or one or more components of the implement 14. Additionally, as is generally understood, the work vehicle 12 may include an engine 23 and a transmission 25 mounted on the chassis 22. The transmission 25 may be operably coupled to the engine 23 and may provide variably adjusted gear ratios for transferring engine power to the track assemblies 18, 20 via a drive axle assembly (not shown) (or via axles if multiple drive axles are employed).

Additionally, as shown in FIG. 1 , the implement 14 may generally include a carriage frame assembly 26 configured to be towed by the work vehicle 12 via a pull hitch or tow bar 28 in the direction of travel 16 of the vehicle 12. As is generally understood, the carriage frame assembly 26 may be configured to support a plurality of ground-engaging tools, such as a plurality of shanks, disk blades, leveling blades, basket assemblies, tines, spikes, and/or the like. For example, in the illustrated embodiment, the carriage frame assembly 26 is configured to support various gangs of disc blades 30, a plurality of ground engaging shanks 32, a plurality of leveling blades 34, and a plurality of crumbler wheels or basket assemblies 36. However, in alternative embodiments, the carriage frame assembly 26 may be configured to support any other suitable ground engaging tools and/or combination of ground engaging tools. In several embodiments, the various ground-engaging tools may be configured to perform a tillage operation or any other suitable ground-engaging operation across the field along which the implement 14 is being towed. It should be understood that, in addition to being towed by the work vehicle 12, the implement 14 may also be a semi-mounted implement connected to the work vehicle 12 via a two-point hitch (not shown) or the implement 14 may be a fully mounted implement (e.g., mounted the work vehicle's 12 three-point hitch (not shown)).

It should be appreciated that the configuration of the agricultural machine 10 described above and shown in FIG. 1 is provided only to place the present subject matter in an exemplary field of use. Thus, it should be appreciated that the present subject matter may be readily adaptable to any manner of machine configuration, including any suitable work vehicle configuration and/or implement configuration. For example, in an alternative embodiment of the work vehicle 12, a separate frame or chassis may be provided to which the engine, transmission, and drive axle assembly are coupled, a configuration common in smaller tractors. Still other configurations may use an articulated chassis to steer the work vehicle 10 or rely on tires/wheels in lieu of the track assemblies 18, 20. Similarly, as indicated above, the carriage frame assembly 26 of the implement 14 may be configured to support any other suitable combination of type of ground-engaging tools.

Furthermore, in accordance with aspects of the present subject matter, the agricultural machine 10 may include one or more imaging devices 104 coupled thereto and/or supported thereon. Each imaging device(s) 104 may, for example, be configured to capture images or other data relating to one or more conditions of the field along which the machine 10 is being traversed. Specifically, in several embodiments, the imaging device(s) 104 may be used to collect data associated with one or more surface conditions of the field, such as one or more conditions relating to crop residue, soil clods, and/or surface irregularities (e.g., ridges and/or valleys) within the field. For instance, as will be described below, the imaging device(s) may be used to collect data associated with the detection of terrain variations within the field.

In several embodiments, the imaging device(s) 104 may be provided in operative association with the agricultural machine 10 such that the imaging device(s) 104 has a field of view directed towards a portion(s) of the field adjacent to the work vehicle 12 and/or the implement 14, such as a portion(s) of the field disposed in front of, behind, and/or along one or both of the sides of the work vehicle 12 and/or the implement 14. For example, as shown in FIG. 1 , in some embodiments, an imaging device(s) 104A may be provided at a forward end portion 38 of the work vehicle 12 to allow the imaging device(s) 104A to capture images and related data of a section of the field disposed in front of the work vehicle 12. Such a forward-located imaging device(s) 104A may allow pre-tillage images of the field to be captured for monitoring or determining surface conditions of the field (e.g., terrain variations) prior to the performance of a tillage operation. Similarly, as shown in FIG. 1 , a second imaging device(s) 104B may be provided at or adjacent to an aft end portion 40 of the implement 14 to allow the imaging device(s) 104B to capture images and related data of a section of the field disposed behind the implement 14. Such an aft-located imaging device(s) 104B may allow post-tillage images of the field to be captured for monitoring or determining surface conditions of the field (e.g., terrain variations) after the performance of a tillage operation.

It should be appreciated that, in alternative embodiments, the imaging device(s) 104 may be installed at any other suitable location(s) on the work vehicle 12 and/or the implement 14. In addition, it should be appreciated that, in other embodiments, the agricultural machine 10 may only include a single imaging device(s) 104 mounted on either the work vehicle 12 or the implement 14 or may include more than two imaging device(s) 104 mounted on the work vehicle 12 and/or the implement 14. Moreover, it should be appreciated that each imaging device(s) 104 may be configured to be mounted or otherwise supported relative to a portion of the agricultural machine 10 using any suitable mounting/support structure. For instance, in some embodiments, each imaging device(s) 104 may be directly or indirectly mounted to a portion of the work vehicle 12 and/or the implement 14. For example, in some embodiments, suitable mounting structure (e.g., mounting arms, brackets, trays, etc.) may be used to support each imaging device(s) 104 out in front of the vehicle 12 or behind the implement 14 (e.g., in a cantilevered arrangement) to allow the imaging device(s) 104 to obtain the desired field of view, including the desired orientation of the device's field of view relative to the field (e.g., a straight-down view oriented generally perpendicular to the surface of the field).

In general, the imaging device(s) 104 may correspond to any suitable device(s) or other assembly configured to capture images of the field. For instance, in several embodiments, the imaging device(s) 104 may correspond to a stereo camera assembly having first and second cameras 106, 108 (FIG. 2 ) incorporated therein or otherwise forming a part thereof. In such embodiments, the stereo camera assembly may be used to capture both two-dimensional and three-dimensional images of the field. Specifically, each camera may include a lens and a separate image sensor for capturing two-dimensional images. Additionally, by simultaneously capturing an image of the same portion of the field with each camera, the separate images can be combined, compared and/or otherwise processed to extract three-dimensional information about such portion of the field. For example, by comparing the images captured by each camera, a depth image and/or a disparity image or map can be generated that allows the scene depth to be determined (e.g., relative to the camera) at each corresponding pixel location within the imaged portion of the field, which, in turn, can be converted into a scene height (or pixel height) at each corresponding pixel location relative to a reference plane (e.g., a reference plane approximating the soil surface). As a result, the relative height of specific features or points within the field may be determined, such as the relative height of soil within the field. It should be appreciated that, in addition to a stereo camera assembly or as an alternative thereto, the agricultural machine 10 may include any other suitable type of imaging device(s) 104. For instance, suitable imaging device(s) 104 may also include single or non-stereo cameras, spectroscope cameras, multi-spectrum cameras and/or the like.

Referring now to FIG. 2 , a schematic view of a system 100 for monitoring one or more surface conditions associated with a field is illustrated in accordance with aspects of the present subject matter. Specifically, in several embodiments, the disclosed system 100 is configured for detecting terrain variations within an agricultural field. The system 100 will generally be described herein with reference to the agricultural machine 10 described above with reference to FIG. 1 . However, it should be appreciated by those of ordinary skill in the art that the disclosed system 100 may generally be utilized with agricultural machines having any other suitable machine configuration.

As shown in FIG. 2 , the system 100 may include one or more imaging device(s) (e.g., the imaging devices 104 shown in FIG. 1 ) configured to capture images of a portion(s) of the field disposed adjacent to the work vehicle 12 and or the implement 14. As indicated above, in several embodiments, one or more of the imaging device(s) 104 may correspond to a stereo camera assembly including first and second cameras 106, 108 for capturing both two-dimensional and three-dimensional images of the field. Additionally, the system 100 may include or be associated with one or more components of the agricultural machine 10 described above with reference to FIG. 1 , such as one or more components of the work vehicle 12 and/or the implement 14.

The system 100 may further include a computing system 110 communicatively coupled to the imaging device(s) 104. In several embodiments, the computing system 110 may be configured to receive and process the images captured by the imaging device(s) 104 to allow one or more surface conditions of the imaged portions of the field to be determined. For instance, the computing system 110 may be configured to execute one or more suitable image processing algorithms for detecting the presence of terrain variations within the field.

In general, the computing system 110 may comprise any suitable processor-based device known in the art, such as a computing device or any suitable combination of computing devices. Thus, in several embodiments, the computing system 110 may include one or more processor(s) 112 and associated memory device(s) 114 configured to perform a variety of computer-implemented functions. As used herein, the term “processor” refers not only to integrated circuits referred to in the art as being included in a computer, but also refers to a controller, a microcontroller, a microcomputer, a programmable logic controller (PLC), an application specific integrated circuit, and other programmable circuits. Additionally, the memory device(s) 114 of the computing system 110 may generally comprise memory element(s) including, but not limited to, a computer readable medium (e.g., random access memory (RAM)), a computer readable non-volatile medium (e.g., a flash memory), a floppy disk, a compact disc-read only memory (CD-ROM), a magneto-optical disk (MOD), a digital versatile disc (DVD) and/or other suitable memory elements. Such memory device(s) 114 may generally be configured to store suitable computer-readable instructions that, when implemented by the processor(s) 112, configure the computing system 110 to perform various computer-implemented functions, such as one or more aspects of the image processing algorithm(s) and/or related method(s) described below. In addition, the computing system 110 may also include various other suitable components, such as a communications circuit or module, one or more input/output channels, a data/control bus and/or the like.

It should be appreciated that, in several embodiments, the computing system 110 may correspond to an existing controller of the agricultural machine 10 or the computing system 110 may correspond to a separate processing device. For instance, in some embodiments, the computing system 110 may form all or part of a separate plug-in module or computing device that is installed relative to the work vehicle 12 or implement 14 to allow for the disclosed system and method to be implemented without requiring additional software to be uploaded onto existing control devices of the work vehicle 12 or implement 14.

In several embodiments, the memory 114 of the computing system 110 may include one or more databases for storing information received and/or generated by the computing system 110. For instance, as shown in FIG. 2 , the memory 114 may include an image database 116 storing data associated with the images captured by the imaging device(s) 104, including the images themselves and/or data deriving from the images (e.g., disparity maps, depth images generated based on the images captured by the imaging device(s) 104, convolutions of the depth images, etc.). Additionally, the memory 114 may include a surface condition database 118 storing data associated with the surface condition(s) being monitored by the computing system 110. For instance, as indicated above, the images and related data deriving from the imaging device(s) 104 may be used to detect the present terrain variations within the field. In such instance, any related “terrain variations” data generated by the computing system 110 may be stored within the surface condition database 118 for subsequent processing and/or analysis.

Moreover, as shown in FIG. 2 , in several embodiments, the instructions stored within the memory 114 of the computing system 110 may be executed by the processor(s) 112 to implement an image analysis module 128. In general, the image analysis module 128 may be configured to process/analyze the images received from the imaging device(s) 104 and/or the data deriving therefrom to estimate or determine one or more surface conditions associated with the field. Specifically, in several embodiments, the image analysis module 128 may be configured to execute one or more image processing algorithms, such as the imaging processing algorithms described herein, to allow terrain variations to be identified by the computing system 110. For example, in some embodiments, the memory 114 storing instructions may configure the computing system 110 to receive the one or more images from the imaging devices 104, classify a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels, identify each soil pixel having a pixel height that exceeds a pixel height threshold as a candidate ridge pixel, and determine whether a ridge is present within the imaged portion of the agricultural field based at least in part on the candidate ridge pixels. Additionally or alternatively, in some embodiments, the memory 114 storing instructions may configure the computing system 110 to receive the one or more images from the imaging devices 104, classify a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels, identify each soil pixel having a pixel depth that exceeds a pixel depth threshold as a candidate valley pixel, and determine whether a valley is present within the imaged portion of the agricultural field based at least in part on the candidate valley pixels.

Referring still to FIG. 2 , in some embodiments, the instructions stored within the memory 114 of the computing system 110 may also be executed by the processor(s) 112 to implement a control module 120. In general, the control module 120 may be configured to electronically control the operation of one or more components of the agricultural machine 10. For instance, in several embodiments, the control module 120 may be configured to control the operation of the agricultural machine 10 based on the monitored surface condition(s) of the field. Such control may include controlling the operation of one or more components 122 of the work vehicle 12, such as the engine 23 and/or the transmission 25 of the vehicle 12 to automatically adjust the ground speed of the agricultural machine 10. In addition (or as an alternative thereto), the control module 120 may be configured to electronically control the operation of one or more components 124 of the implement 14. For instance, the control module 120 may be configured to adjust the operating parameters (e.g., penetration depth, down force/pressure, etc.) associated with one or more of the ground-engaging tools 126 of the implement 14 (e.g., the disc blades 30, shanks 32, leveling blades 34, and/or basket assemblies 36) to proactively or reactively adjust the operation of the implement 14 in view of the monitored surface condition(s).

In several embodiments, the computing system 110 may also be communicatively coupled to a user interface, such as a user interface 130 housed within the cab 24 of the work vehicle 12 or at any other suitable location. The user interface 130 may be configured to provide feedback to the operator of the agricultural machine 10. Thus, the user interface 130 may include one or more feedback devices (not shown), such as display screens, speakers, warning lights, and/or the like, which are configured to communicate such feedback. In addition, some embodiments of the user interface 130 may include one or more input devices (not shown), such as touchscreens, keypads, touchpads, knobs, buttons, sliders, switches, mice, microphones, and/or the like, which are configured to receive user inputs from the operator.

It should be appreciated that, although the various control functions and/or actions will generally be described herein as being executed by the computing system 110, one or more of such control functions/actions (or portions thereof) may be executed by a separate computing system or may be distributed across two or more computing systems (including, for example, the computing system 110 and a separate computing system). For instance, in some embodiments, the computing system 110 may be configured to acquire data from the imaging device(s) 104 for subsequent processing and/or analysis by a separate computing system (e.g., a computing system associated with a remote server). In other embodiments, the computing system 110 may be configured to execute the image analysis module 128 to determine and/or monitor one or more surface conditions within the field, while a separate computing system (e.g., a vehicle computing system associated with the agricultural machine 10) may be configured to execute the control module 120 to control the operation of the agricultural machine 10 based on data and/or instructions transmitted from the computing system 110 that are associated with the monitored surface condition(s).

Referring now to FIGS. 3-5 , a flow diagram of example control logic 200 that may be executed by the computing system 110 (or any other suitable computing system) for detecting terrain variations within imaged portions of a field is illustrated in accordance with aspects of the present subject matter. Specifically, the control logic 200 shown in FIGS. 3-5 is representative of steps of an image processing algorithm that can be executed to detect terrain variations within imaged portions of a field with greater accuracy and without requiring substantial computing resources and/or processing time. Thus, in several embodiments, the control logic 200 may be advantageously utilized in association with a system installed on or forming part of an agricultural machine to allow for real-time detection of terrain variations within a field as the machine is being traversed across the field during the performance of an agricultural operation. However, in other embodiments, the control logic 200 may be used in association with any other suitable system, application, and/or the like for detecting terrain variations within a field.

As shown in FIG. 3 , at (202), the control logic 200 includes receiving images of the imaged portion of the field. For example, as indicated above, the computing system 110 may be communicatively coupled to the imaging device(s) 104, thereby allowing images captured by the imaging device(s) to be transmitted to and received by the computing system 110. In several embodiments, the image(s) received of each imaged portion of the field may correspond to a depth image(s) providing depth or height information at each pixel location. For instance, when the imaging device(s) 104 comprises a stereo camera assembly, the imaging device(s) 104 may be configured to pre-process the images captured by each camera 106, 108 (FIG. 2 ) to form a depth image of the imaged portion of the field, which can then be transmitted to the computing system 110. Alternatively, the imaging device(s) 104 may be configured to transmit the individual images captured by each camera 106, 108 to the computing system 110, in which case the computing system 110 may be configured to combine, compare and/or otherwise process the images to generate the depth image. Regardless, the depth image may generally provide a pixel height value for each pixel within the image being analyzed, which can then be used by the computing system 110 to detect the presence of terrain variations within the imaged portion of the field.

In several embodiments, the computing system 110 may be configured to smooth or otherwise filter the image. Single-instruction, multiple-data (SIMD) and other parallel processing techniques may be used to process the image data. The image convolution can be based on singular value decomposition (SVD) of a non-separable smoothing or other kernel.

At (204), the control logic 200 includes generating a residue/soil mask associated with the imaged portion of the field. Specifically, the computing system 110 may be configured to analyze the image(s) of the imaged portion of the field using one or more image processing algorithms to distinguish soil from crop residue within the image(s), thereby allowing the computing system 110 to classify each pixel within the image(s) as a soil pixel or a residue pixel. For instance, FIG. 6 illustrates an example residue/soil mask 250 associated with an imaged portion of a field in which the residue pixels are shaded to indicate the crop residue 252 within the field and the soil pixels are unshaded to indicate soil 254 within the field.

It should be appreciated that the computing system 110 may be configured to utilize any suitable image processing algorithm(s) to distinguish soil from crop residue (or any other object) within each image being processed. For instance, in some embodiments, a texture-based algorithm may be utilized that relies on the orientations of image gradients to differentiate residue pixels from soil pixels. Specifically, residue regions are typically characterized by a high number of gradients in the same direction due to the straightness of the residue pieces, whereas soil gradients are more randomly oriented. Thus, by identifying the gradient orientations within the images, the pixels can be analyzed and classified as residue/soil pixels. In other embodiments, a color-based algorithm may be utilized that relies on color differences to differentiate between residue and soil pixels. In further embodiments, when the imaging device(s) 104 is capable of capturing the distinction between the reflective characteristics of the soil/residue, an algorithm may be used that identifies the differences in the reflectivity or spectral absorption between the soil and crop residue contained within each image.

Referring back to FIG. 3 , at (206), the control logic 200 may also include the generation of a slope-corrected depth image. Specifically, in some embodiments, the depth or height information associated with the depth image received from the imaging device(s) 104 (or generated based on the images received from the imaging device(s) 104) may be corrected or adjusted based on an estimated slope of the imaged portion of the field. An example algorithm or control logic for generating a slope-corrected depth image will be described below with reference to FIG. 17 .

At (208), the control logic 200 includes calculating a reference plane or nominal height of the soil surface to be used for analyzing the soil pixels contained within a given image to determine whether any terrain variations are present within the imaged portion of the field. Such calculation may be performed using the original depth image received from (or deriving from images transmitted by) the imaging device(s) 104 or using the slope-corrected depth image (e.g., as calculated at (206)).

In several embodiments, the reference height may correspond to an estimated “nominal soil height” of the soil surface. To estimate the nominal soil height, the computing system 110 may, in some embodiments, be configured to determine an estimated soil height of the soil contained within the imaged portion of the field. For instance, in some embodiments, the computing system 110 may be configured to estimate the nominal soil height by calculating an average height of the soil pixels within the image. For instance, as indicated above, each pixel within the depth image may be associated with a pixel height. Thus, by averaging the pixel heights associated with the previously classified or identified soil pixels, an average soil height may be calculated. In some embodiments, the average pixel height may be subtracted from the depth image to determine the nominal height of the soil surface. It will be appreciated that the computing system 110 may be configured to determine the nominal soil height contained within the imaged portion of the field using any other suitable methodology without departing from the scope of the present disclosure.

Referring further to FIG. 3 , at (210), the control logic 200 may also include downscaling the depth image. The downscaling of the depth image may be accomplished through a downscaling algorithm that limits the spectral bandwidth of the input high resolution image by applying a low-pass filter, subsampling, and reconstructing the result. The downscaling of the depth image may allow for detection of macroscopic (e.g., low-resolution) changes in terrain variation.

It will be appreciated that any of the steps described herein (e.g., with reference to control logic 200, control logic 300, and/or method 400) may be performed using the original depth image received from (or deriving from images transmitted by) the imaging device(s) 104, using the slope-corrected depth image (e.g., as calculated at (206)), and/or using the downscaled depth image (e.g., as generated at (210)).

Referring still to FIG. 3 , at (212), the control logic 200 includes determining a height threshold and a depth threshold based on the reference height (e.g., as calculated at (208)). For instance, in embodiments in which the reference height corresponds to the nominal soil height, a height threshold will generally be selected that is above the nominal soil height by a given amount, thereby allowing for the detection of terrain variations that have heights exceeding the nominal soil height by such amount. For example, in some embodiments, an offset height value (e.g., one inch) may be added to the reference height to set the height threshold.

Likewise, a depth threshold will generally be selected that is below the nominal soil height by a given amount, thereby allowing for the detection of terrain variations that have depths below the nominal soil height by such amount. For instance, in some embodiments, an offset depth value (e.g., one inch) may be added to the reference height to set the depth threshold. In several embodiments, the offset height value and/or the offset depth value may each correspond to a fixed value or may be selected or determined based on the soil conditions within the field. For instance, in some embodiments, the offset height value and/or the offset depth value may each correspond to an operator-selected value based on observed conditions or a value that is calculated based on sensed surface conditions associated with the soil within the field.

At (214), the control logic 200 includes determining whether the pixel height of each soil pixel contained within the image exceeds the height threshold (e.g., as calculated at (210)). Specifically, in several embodiments, the computing system 110 may be configured to compare the pixel height associated with each previously identified soil pixel to the corresponding height threshold. If the pixel height associated with a given soil pixel is greater than the height threshold, the computing system 110 may be configured to classify (e.g., at 216) such soil pixel as a “candidate ridge pixel.” As will be described below, the candidate ridge pixels may then be analyzed to determine whether such pixels are in fact associated with a ridge within the imaged portion of the field.

If the pixel height associated with a given soil pixel is less than or equal to the height threshold, at (218) the control logic 200 includes determining whether the pixel height of each soil pixel contained within the image exceeds the depth threshold (e.g., as calculated at (210)) indicating that the pixel height extends below the nominal height of the soil surface by an amount that exceeds the depth threshold. Specifically, in several embodiments, the computing system 110 may be configured to compare the pixel height associated with each previously identified soil pixel to the corresponding depth threshold. If the pixel height associated with a given soil pixel exceeds the depth threshold, the computing system 110 may be configured to classify (e.g., at 220) such soil pixel as a “candidate valley pixel.” As will be described below, the candidate valley pixels may then be analyzed to determine whether such pixels are in fact associated with a valley within the imaged portion of the field.

If the pixel height associated with a given soil pixel is equal to or between the height threshold and the depth threshold, the computing system 110 may be configured to classify (e.g., at 222) such soil pixels as a “not a terrain variation pixel.” Thus, the computing system 110 may be configured to analyze the soil pixels contained within the image in view of the height threshold/depth threshold and classify each pixel as a “candidate ridge pixel,” a “candidate valley pixel,” or “not a terrain variation pixel.”

With reference to FIG. 4 , which is a continuation of the control logic 200 of FIG. 3 , at (224), the control logic 200 includes generating a ridge mask based on the candidate ridge pixels (e.g., as identified at (216)). In general, the ridge mask may be used to map the pixels within the image that are potentially associated with a ridge (i.e., the candidate ridge pixels), thereby allowing localized areas of such pixels to be easily identified and analyzed. For instance, FIG. 7 illustrates the residue/soil mask 250 shown in FIG. 6 with a ridge mask 260 superimposed or overlaid onto the residue mask 250. As shown, the candidate ridge pixels are identified in FIG. 7 by patterned regions 262, 264, 266 of varied heights relative to one another with each region 262, 264, 266 having pixels that exceed the height threshold. As a result, the pixel regions 262, 264, 266 identify the areas within the image where soil pixels exist having pixel heights that exceed the height threshold and, thus, are potentially associated with a ridge.

With further reference to FIGS. 4 and 7 , at (226), the control logic 200 includes determining a volume associated with the candidate ridge pixels. Specifically, in several embodiments, the computing system 110 may be configured to determine the ridge volume associated with the previously identified candidate ridge pixels. For instance, the computing system 110 may be configured to analyze the ridge mask 260 to determine the ridge volumes associated with the pixel regions 262, 264, 266 contained within such mask 254. Once the ridge volumes associated with each pixel within the pixel regions 262, 264, 266 are calculated, a total ridge volume is determined based on a summation of candidate ridge pixels within the image. In some embodiments, the computing system 110 may calculate the total ridge volume by sorting the height of each of the candidate ridge pixels based on height and using a predefined percentile (e.g., 95^(th) percentile) as the respective height of the ridge. In other embodiments, the computing system 110 may calculate a total ridge volume by summing a volume of a ridge at each of the candidate ridge pixels. For example, to calculate the volume of the ridge at each of the candidate ridge pixels, the computing system 110 may multiply an area represented by each of the candidate ridge pixels with the height of each of the candidate ridge pixels. In such embodiments, the total volume of the ridge may be calculated as the sum of the area represented by each of the candidate ridge pixels multiplied by the height of each of the candidate ridge pixels (or an average of the height of each of the candidate ridge pixels).

In various embodiments, the computing system 110 may calculate the total ridge volume based on a percent of the candidate ridge pixels within the image that may be less than all of the candidate ridge pixels to remove outliers from the candidate ridge pixels, which may lead to a more accurate total ridge volume. For example, in some embodiments, the total ridge volume may be calculated while removing the tallest five percent (or any other percentage) of candidate ridge pixels.

Referring back to FIG. 4 , at (228), the control logic 200 includes determining whether the total ridge volume associated with the candidate ridge pixels exceeds a predetermined ridge volume threshold. If the total ridge volume associated with the candidate ridge pixels is less than or equal to the ridge volume threshold, the computing system 110 may be configured to determine (e.g., at 230) that a ridge is not present within the imaged portion of the field. However, if the total ridge volume associated with the candidate ridge pixels is greater than the ridge volume threshold, the computing system 110 may be configured to determine (e.g., at 232) that a ridge is present within the imaged portion of the field. It should be appreciated that the ridge volume threshold may generally correspond to a fixed value or may be selected or determined based on the current soil conditions within the field. For instance, in some embodiments, the ridge volume threshold may correspond to an operator-selected value based on observed conditions or a value that is calculated based on sensed surface conditions associated with the soil within the field.

It should be appreciated that, in some embodiments, the predetermined ridge volume threshold may be used to evaluate the entirety of the portion of the field contained within the image. In such an embodiment, the predetermined ridge volume threshold may correspond to a ridge volume threshold selected for evaluating the total pixel area associated with the candidate ridge pixels. Specifically, the total ridge volume associated with the candidate ridge pixels may be determined and then compared to the associated ridge volume threshold to determine whether the identified candidate ridge pixels, as a whole, generally indicate the presence of a ridge within the imaged portion of the field. Alternatively, the predetermined ridge volume threshold may be used to evaluate smaller sections of the portion of the field contained within the image. For instance, in some embodiments, the predetermined ridge volume threshold may correspond to a ridge volume threshold selected for evaluating the pixel area associated with a localized region or continuous area of candidate ridge pixels (e.g., the pixel regions 262, 264, 266 associated with the ridge mask illustrated in FIG. 7 ). In such an embodiment, the ridge volume associated with a given localized region of candidate ridge pixels may be determined and then compared to the associated ridge volume threshold to determine whether such localized region should be classified as a ridge.

At (234), the control logic 200 includes calculating a ridge direction. Specifically, the computing system 110 may generate a convolution by moving one or more target images 270 relative to a reference image 272 to determine the ridge direction. In various embodiments, the reference image 272 may be the depth image and/or a downscaled version of the depth image (either of which may be slope corrected, as described herein). The target images 270 may be overlaid onto the reference image 272 at various displacements. For instance, FIGS. 8-11 illustrate various target images 270 that are offset from the reference image 272 in a plurality of positions. It will be appreciated that while four examples are provided, the computing system 110 may generate any number of target images 270 that are offset from the reference image 272. The computing system 110 may determine which of the target images 270 offset from the reference image 272 maximizes the convolution. The angle corresponding to the displacement that maximizes the convolution is determined to be the ridge direction, which is generally illustrated by line 274 in FIG. 8 . In further embodiments, the computing system 110 may use any other method or algorithm for detecting a direction of the ridge. For example, the computing system 110 may be configured to determine a line of best fit based on the ridge mask with the line of best fit being the direction of the ridge.

With reference to FIG. 5 , which is a continuation of the control logic 200 of FIGS. 3 and 4 , at (236), the control logic 200 includes generating a valley mask based on the candidate valley pixels (e.g., as identified at (220)). In general, the valley mask may be used to map the pixels within the image that are potentially associated with a valley (i.e., the candidate valley pixels), thereby allowing localized areas of such pixels to be easily identified and analyzed. For instance, FIG. 12 illustrates the residue/soil mask 250 shown in FIG. 6 with a valley mask 280 superimposed or overlaid onto the residue mask 250. As shown, the candidate valley pixels are identified in FIG. 12 by cross-hatched regions 282, 284, 286 of varied depths relative to one another with each region 282, 284, 286 having pixels that exceed the depth threshold. As a result, the pixel regions 282, 284, 286 identify the areas within the image where soil pixels exist having pixel depths that exceed the depth threshold and, thus, are potentially associated with a valley.

Referring back to FIG. 5 , at (238), the control logic 200 includes determining a volume associated with the candidate valley pixels. Specifically, in several embodiments, the computing system 110 may be configured to determine the valley volume associated with the previously identified candidate valley pixels. For instance, the computing system 110 may be configured to analyze the valley mask 280 to determine the valley volumes associated with the pixel regions 282, 284, 286 contained within the valley mask 280. Once the valley volumes associated with each pixel within the pixel regions 282, 284, 286 is calculated, a total valley volume is determined based on a summation of each candidate valley pixel within the image. In some embodiments, the computing system 110 may calculate the total valley volume by sorting the depth of each of the candidate valley pixels from the largest depth (greatest distance from the ground plane) to the smallest depth (least distance from the ground plane) in a negative (below ground) direction relative to a reference plane and using a predefined percentile (e.g., 95th percentile in the negative direction) as the respective depth of the valley. In other embodiments, the computing system 110 may calculate a total valley volume by summing the a volume of a valley at each of the candidate valley pixels. For example, to calculate the volume of the valley at each of the candidate ridge pixels, the computing system 110 may multiply an area represented by each of the candidate valley pixels with the depth of each of the associated candidate valley pixels. In such embodiments, the total volume of the valley may be calculated as the sum of the area represented by each of the candidate valley pixels multiplied by the depth of each of the candidate valley pixels (or an average of the depths of each of the candidate valley pixels).

In various embodiments, the computing system 110 may calculate the total valley volume based on a percent of the candidate valley pixels within the image, which may be less than all of the candidate valley pixels to remove outliers from the candidate valley pixels, which may lead to a more accurate total valley volume. For example, in some embodiments, the total valley volume may be calculated while removing the largest five percent (or any other percentage) of candidate valley pixels by volume in the negative direction.

At (240), the control logic 200 includes determining whether the total valley volume associated with the candidate valley pixels exceeds a predetermined valley volume threshold. Since the total valley volume will be negative because the volume is below the reference plane, the computing system 110 may be configured to determine an absolute value of the valley volume, which is then used as a total valley volume associated with the candidate valley pixels. If the total valley volume associated with the candidate valley pixels is less than or equal to the valley volume threshold, the computing system 110 may be configured to determine (e.g., at 242) that a valley is not present within the imaged portion of the field. However, if the total valley volume associated with the candidate valley pixels is greater than the valley volume threshold, the computing system 110 may be configured to determine (e.g., at 244) that a valley is present within the imaged portion of the field. It should be appreciated that the valley volume threshold may generally correspond to a fixed value or may be selected or determined based on the current soil conditions within the field. For instance, in some embodiments, the valley volume threshold may correspond to an operator-selected value based on observed conditions or a value that is calculated based on sensed surface conditions associated with the soil within the field.

It should be appreciated that, in some embodiments, the predetermined valley volume threshold may be used to evaluate the entirety of the portion of the field contained within the image. In such an embodiment, the predetermined valley volume threshold may correspond to a valley volume threshold selected for evaluating the total pixel area associated with the candidate valley pixels. Specifically, the total valley volume associated with the candidate valley pixels may be determined and then compared to the associated valley volume threshold to determine whether the identified candidate valley pixels, as a whole, generally indicate the presence of a valley within the imaged portion of the field. Alternatively, the predetermined valley volume threshold may be used to evaluate smaller sections of the portion of the field contained within the image. For instance, in some embodiments, the predetermined valley volume threshold may correspond to a valley volume threshold selected for evaluating the pixel area associated with a localized region or continuous area of candidate valley pixels (e.g., the pixel regions 282, 284, 286 associated with the valley mask 280). In such an embodiment, the valley volume associated with a given localized region of candidate valley pixels may be determined and then compared to the associated valley volume threshold to determine whether such localized region should be classified as a valley.

At (246), the control logic 200 includes calculating a valley direction. Specifically, the computing system 110 may generate a convolution by moving one or more target images 288 relative to a reference image 290 to determine the slope direction. In various embodiments, the reference image 290 may be the depth image and/or a downscaled version of the depth image 290 (either of which may be slope corrected, as described herein). The target images 288 may be overlaid onto the reference image 290 at various displacements. For instance, FIGS. 13-16 illustrate various target images 288 that are offset from the reference image 290 in a plurality of positions. It will be appreciated that while four examples are provided, the computing system 110 may generate any number of target images 288 that are offset from the reference image 290. The computing system 110 may determine which of the target images 288 offset from the reference image 290 maximizes the convolution. The angle corresponding to the displacement that maximizes the convolution is determined to be the valley direction, which is generally illustrated by line 292 in FIG. 14 . In further embodiments, the computing system 110 may use any other method or algorithm for detecting a direction of the valley. For example, the computing system 110 may be configured to determine a line of best fit based on the valley mask with the line of best fit being the direction of the valley.

It will be appreciated that any of the steps discussed herein with regards to ridge detection may be completed generally simultaneously with any of the steps discussed herein with regards to valley detection. For example, the convolution of the depth image may be performed on a depth image (that may form the reference image) that includes detected ridges and/or valleys. In cases in which the depth image includes both at least one ridge and at least one valley, the convolution may be determine both the direction of the ridge and the valley simultaneously. Additionally or alternatively, any of the steps discussed herein with regards to ridge detection may be completed independently with any of the steps discussed herein with regards to valley detection.

It should be appreciated that, upon detection of a ridge or valley (i.e., terrain variation), the computing system 110 may be configured to perform any number of follow-up actions, including storing data associated with the detected ridge or valley within its memory 114 and/or transmitting such data to a separate computing device (e.g., a remote server and/or a computing device associated with a corresponding agricultural machine, such as a vehicle controller). Such actions may also include generating a notification for display to an operator (e.g., via the associated user interface 130) that provides information associated with the detection of ridges or valleys, such as the location, number, and/or height of any detected ridges or valleys.

Additionally, as indicated above, the computing system 110 (or a separate computing system) may be configured to control the operation of an associated agricultural machine based on the detection of ridges or valleys. For instance, when the imaging device(s) 104 are installed on an agricultural machine, the present subject matter may allow for real-time detection of ridges or valleys within a field as the machine traverses the field during the performance of an agricultural operation. In such an embodiment, adjustments of the operation of the agricultural machine may be made in real-time or on-the-fly in response to the detection of ridges or valleys. For example, when the agricultural machine includes a tillage implement configured to perform tillage operation within the field (e.g., the implement 14 shown in FIG. 1 ), real-time or on-the-fly adjustments may be made to the tillage parameters associated with the ground-engaging tools of the implement, such as by adjusting the penetration depth, down pressure/force, angle-of-attack, and/or the like of one or more of the ground-engaging tools.

Moreover, in embodiments in which the disclosed system is configured to capture both pre-tilled and post-tilled images of the field, the computing system 110 may be configured to compare and contrast the pre-tilled and post-tilled images to assess the effectiveness of a tillage implement in breaking-up or dispersing the ridges or valleys. For instance, when a ridge or valley is detected in a pre-tilled image of a given imaged portion of the field, a corresponding post-tilled image of such portion of the field may also be captured to determine whether the detected ridge or valley still exists within the field. To the extent the ridge or valley is still present, the post-tilled area, height, and/or depth associated with such ridge or valley can be compared to the pre-tilled area, height, and/or depth to determine if the area/height/depth of the ridge or valley was reduced and, if so, to what extent.

Referring now to FIG. 17 , a flow diagram of example control logic 300 that may be executed for generating a slope-corrected depth image is illustrated in accordance with aspects of the present subject matter. As indicated above, a slope-corrected depth image may, in several embodiments, be used as an input within the control logic 200 described above with reference to FIGS. 3-5 . The control logic 300 shown in FIG. 17 is generally representative of steps of an image processing algorithm that can be executed to generate a slope-corrected depth image within imaged portions of a field with greater accuracy and without requiring substantial computing resources and/or processing time.

At (302) and (304), the control logic 300 includes receiving images of an imaged portion of the field and generating a residue/soil mask associated with the imaged portion of the field. As described above with reference to the control logic 200 shown in FIG. 3 , the computing system 110 may be configured to analyze the image(s) received from the imaging device(s) 104 using one or more image processing algorithms to distinguish soil from crop residue within the image(s), thereby allowing the computing system 110 to classify each pixel within the image(s) as a soil pixel or a residue pixel. For instance, FIG. 18 illustrates another example residue mask 350 associated with an imaged portion of a field in which the residue pixels are shaded to indicate the crop residue 352 within the field, with the unshaded pixels (i.e., the soil pixels) being indicative of soil 354 within the field. It will be appreciated that additional masks can also be generated in the same manner. For example, the computing system 110 may also be capable of generating a foreign object mask (e.g., pixels not corresponding to residue or soil pixels), with the detected foreign objects being used or removed from any further steps within the algorithm.

Referring back to FIG. 17 , at (306), the control logic 300 includes calculating an initial reference plane to be used for analyzing the pixels contained within a given image to determine whether any stem pixels (e.g., upright/near-vertical stems) are present within the imaged portion of the field. In several embodiments, the computing system 110 may be configured to estimate the initial reference plane by calculating an average height of the pixels within the image or a portion of the pixels within the image (e.g., by only using the residue pixels and/or the soil pixels). As indicated above, each pixel within the depth image may be associated with a pixel height. In some embodiments, pixels having a height that is above a predetermined threshold relative to the initial reference plane may be classified as stem pixels. For instance, FIG. 18 illustrates a stem mask 356 superimposed or overlaid onto the residue mask 350 in which the stem pixels are identified. It will be appreciated that the computing system 110 may be configured to determine the stem pixels contained within the imaged portion of the field using any other suitable methodology without departing from the scope of the present disclosure.

Additionally, at (308), the control logic 300 includes calculating a pixel height for each residue pixel or soil pixel. As indicated above, each pixel within the depth image may be associated with a pixel height. In several embodiments, the computing system 110 may use the height of each soil pixel as a ground height of that pixel. In various embodiments, the computing system 110 may determine the ground height of each residue pixel by subtracting a predefined residue carpet height value from the residue pixel height. The predefined residue carpet height value may correspond to a fixed value (e.g., three inches) or may be selected or determined based on the current residue conditions within the field. For instance, in some embodiments, the predefined residue carpet height may correspond to an operator-selected value based on observed conditions associated with the residue carpet or layer across the field. In other embodiments, the predefined residue carpet height may be calculated based on sensed surface conditions associated with the residue within the field.

Moreover, at step (310), the control logic 300 includes dividing the image into a plurality of segments to form a grid. Specifically, in several embodiments, the computing system 110 may be configured to split the image to a grid of segments. For example, as illustrated in FIG. 18 , the image may be split into four segments 360, 362, 364, 366 each having a generally common number of image pixels. It will be appreciated that the image may be divided into any number of segments without departing from the scope of the present disclosure.

Referring back to FIG. 17 , at step (312), the control logic 300 includes determining a segment height for each segment of the image. Specifically, in several embodiments, when a segment of the image includes at least a predefined percentage (e.g., 80 percent) of pixels that have a calculated ground height (e.g., pixels that have been classified as soil pixels or residue pixels (versus stem pixels)), the computing system 110 may be configured to calculate a segment height of that segment of the image. In some embodiments, the computing system 110 may calculate a segment height by sorting the ground heights of each of the soil pixels and residue pixels, in combination, based on the ground heights of each pixel and using a predefined percentile (e.g., 5^(th) percentile) as the respective segment height. In other embodiments, the computing system 110 may calculate each segment height based on an average height of a percentage of the ground heights of each of the soil pixels and residue pixels within the segment of the image. In some instances, the percentage of ground heights of each of the soil pixels and residue pixels within the segment may be less than all of the ground heights of each of the soil pixels and residue pixels within the segment to remove outlying (noise) pixels from the dataset representing each respective segment of the image. For example, in some embodiments, the segment height may be calculated while removing the tallest five percent (or any other percentage) of soil pixels and/or residue pixels.

When a segment of the image includes less than the predefined percentage of pixels that have been classified as soil pixels or residue pixels (versus stem pixels), the computing system 110 may be configured to calculate a segment height of such segments as the mean of the remaining segments that include at least the predefined percentage of pixels that have been classified as soil pixels or residue pixels. In other embodiments, when a segment of the image includes less than the predefined percentage of pixels that have been classified as soil pixels or residue pixels, the segment height may be calculated based on an average of the surrounding segment heights, sensed surface conditions associated the field and/or a predefined height, such as a height of the initial reference plane (e.g., as calculated at (306)).

At (314), the control logic 300 includes generating a slope plane based on the segment heights within the image. Specifically, the computing system 110 may be configured to use any practicable algorithm to determine a best fit slope plane. For example, the computing system 110 may be configured to use a least squares fit to fit a slope plane to the points calculated that form the grid (e.g., a 2×2 grid formed by the four segments 360, 362, 364, 366 of FIG. 19 ). In such instances, the least squares fit may be used to calculate an x intercept, an x gradient, a y intercept, and a y gradient. For instance, FIG. 13 illustrates an example slope plane associated with an imaged portion of a field based on the x intercept, the x gradient, the y intercept, and the y gradient. It will be appreciated, however, that any other method may be used for generating a slope plane based on the segment heights within the image without departing from the scope of the present disclosure.

Referring back to FIG. 17 , at step (316), the control logic 300 includes interpolating the slope plane across the depth image. Specifically, the computing system 110 may be configured to renormalize the x and y gradient values by a ratio of the grid resolution and a depth image resolution (respectively for each of x and y dimensions). For instance, in embodiments that utilize the x intercept, the x gradient, the y intercept, and the y gradient to determine the slope plane, the computing system 110 may be configured to calculate, for each pixel in the depth image, a slope height from its pixel coordinates.

Moreover, at step (318), the control logic 300 includes generating a slope-corrected depth image by modifying the pixel height for each soil pixel and residue pixel in the image based on the offset from the slope plane at each pixel location (e.g., by subtracting or adding the offset to/from the pixel height for each soil/residue depending on whether the slope plane is above/below the reference plane at such pixel). By using the slope-corrected depth image, the computing system 110 may be able to detect one or more surface conditions of the field within the field with greater accuracy and without requiring substantial computing resources and/or processing time.

Referring now to FIG. 20 , a flow diagram of a method 400 for detecting terrain variations within a field is illustrated in accordance with aspects of the present subject matter. In general, the method 400 will be described herein with reference to the agricultural machine 10 shown in FIG. 1 and the various system components shown in FIG. 2 . However, it should be appreciated that the disclosed method 400 may be implemented with agricultural machines having any other suitable machine configurations and/or within systems having any other suitable system configuration. In addition, although FIG. 20 depicts steps performed in a particular order for purposes of illustration and discussion, the methods discussed herein are not limited to any particular order or arrangement. One skilled in the art, using the disclosures provided herein, will appreciate that various steps of the methods disclosed herein can be omitted, rearranged, combined, and/or adapted in various ways without deviating from the scope of the present disclosure.

As shown in FIG. 20 , at (402), the method 400 may include receiving one or more images depicting an imaged portion of an agricultural field. For instance, as described above, the computing system 110 may be communicatively coupled to the imaging device(s) 104, thereby allowing images captured by the imaging device(s) to be transmitted to and received by the computing system 110. Such images may, for example, include depth images or pairs of two-dimensional images that can be compared or otherwise processed to generate corresponding depth images.

Additionally, at (404), the method 400 may include classifying the pixels contained within the image(s) that are associated with soil within the imaged portion of the field as soil pixels. As indicated above, the computing system 110 may be configured to analyze the image(s) received from the imaging device(s) 104 to differentiate between crop residue and soil contained within the imaged portion of the field. For instance, as a result of the analysis, each pixel within the image(s) may be classified as a soil pixel or a residue pixel. Such a classification may allow for a residue mask (e.g., the mask 250 shown in FIG. 6 ) to be generated that identifies each soil pixel within the image(s).

Moreover, at (406), the method 400 may include identifying each soil pixel having a pixel height that exceeds a height threshold as a candidate ridge pixel. For example, as indicated above, the computing system 110 may be configured to compare the pixel height of each soil pixel to a corresponding height threshold (e.g., as determined as a function of a baseline or reference height calculated for the image(s)). Each soil pixel having a pixel height that exceeds the height threshold may then be classified or identified as a candidate ridge pixel.

At (408), the method 400 may include identifying each soil pixel having a pixel height that is less than (or exceeds) a depth threshold as a candidate valley pixel. For example, as indicated above, the computing system 110 may be configured to compare the pixel height of each soil pixel to a corresponding depth threshold (e.g., as determined as a function of a baseline or reference height calculated for the image(s)). Each soil pixel having a pixel height that is less than (or exceeds) the depth threshold may then be classified or identified as a candidate valley pixel.

Referring still to FIG. 20 , at (410), the method 400 may include determining whether a ridge is present within the imaged portion of the field based at least in part on the candidate ridge pixels. For example, as indicated above, the computing system 110 may be configured to conduct a volume-based analysis on the candidate ridge pixels to determine whether a ridge is present within the imaged portion of the field. Specifically, in some embodiments, the total ridge volume associated with the candidate ridge pixels may be compared to a predetermined ridge volume threshold. In the event that the total volume associated with the candidate ridge pixels exceeds the predetermined ridge volume threshold, it may be inferred or determined that a ridge is present within the imaged portion of the field. In other embodiments, the computing system 110 may be configured to conduct an area-based analysis on the candidate ridge pixels to determine whether a ridge is present within the imaged portion of the field. Specifically, in some embodiments, the total pixel area associated with the candidate ridge pixels may be compared to a predetermined ridge pixel area threshold. In the event that the total area associated with the candidate ridge pixels exceeds the predetermined ridge pixel area threshold, it may be inferred or determined that a ridge is present within the imaged portion of the field.

With further reference to FIG. 20 , at (412), the method 400 may include determining whether a valley is present within the imaged portion of the field based at least in part on the candidate valley pixels. For example, as indicated above, the computing system 110 may be configured to conduct a volume-based analysis on the candidate valley pixels to determine whether a valley is present within the imaged portion of the field. Specifically, in some embodiments, the total valley volume associated with the candidate valley pixels may be compared to a predetermined valley volume threshold. In the event that the total volume associated with the candidate valley pixels exceeds the predetermined valley volume threshold, it may be inferred or determined that a valley is present within the imaged portion of the field. In other embodiments, the computing system 110 may be configured to conduct an area-based analysis on the candidate valley pixels to determine whether a valley is present within the imaged portion of the field. Specifically, in some embodiments, the total pixel area associated with the candidate valley pixels may be compared to a predetermined valley pixel area threshold. In the event that the total area associated with the candidate valley pixels exceeds the predetermined valley pixel area threshold, it may be inferred or determined that a valley is present within the imaged portion of the field.

It is to be understood that the steps of the control logic 200, 300 and method 400 are performed by a computing system (e.g., computing system 110) upon loading and executing software code or instructions which are tangibly stored on a tangible computer readable medium, such as on a magnetic medium, e.g., a computer hard drive, an optical medium, e.g., an optical disc, solid-state memory, e.g., flash memory, or other storage media known in the art. Thus, any of the functionality performed by the computing system described herein, such as the control logic 200, 300 and method 400, is implemented in software code or instructions which are tangibly stored on a tangible computer readable medium. The computing system loads the software code or instructions via a direct interface with the computer readable medium or via a wired and/or wireless network. Upon loading and executing such software code or instructions by the computing system, the computing system may perform any of the functionality of the computing system described herein, including any steps of the control logic 200, 300 and method 400 described herein.

The term “software code” or “code” used herein refers to any instructions or set of instructions that influence the operation of a computer or controller. They may exist in a computer-executable form, such as machine code, which is the set of instructions and data directly executed by a computer's central processing unit or by a controller, a human-understandable form, such as source code, which may be compiled in order to be executed by a computer's central processing unit or by a controller, or an intermediate form, such as object code, which is produced by a compiler. As used herein, the term “software code” or “code” also includes any human-understandable computer instructions or set of instructions, e.g., a script, that may be executed on the fly with the aid of an interpreter executed by a computer's central processing unit or by a controller.

This written description uses examples to disclose the invention, including the best mode, and also to enable any person skilled in the art to practice the invention, including making and using any devices or systems and performing any incorporated methods. The patentable scope of the invention is defined by the claims, and may include other examples that occur to those skilled in the art. Such other examples are intended to be within the scope of the claims if they include structural elements that do not differ from the literal language of the claims, or if they include equivalent structural elements with insubstantial differences from the literal languages of the claims. 

What is claimed is:
 1. A method for detecting terrain variations within a field, the method comprising: receiving, with a computing system, one or more images depicting an imaged portion of an agricultural field, the imaged portion of the agricultural field being at least partially represented by a plurality of pixels within the one or more images, wherein the one or more images comprise a depth image of the imaged portion of the agricultural field, each of the plurality of pixels within the depth image being associated with a respective pixel height; classifying, with the computing system, a first portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels and a second portion of the plurality of pixels that are associated with residue within the imaged portion of the agricultural field as residue pixels, each soil pixel being associated with a respective pixel height; masking the second portion of the plurality of pixels; identifying, with the computing system, each soil pixel having a pixel height that exceeds a height threshold as a candidate ridge pixel; identifying, with the computing system, each soil pixel having a pixel height that is less than a depth threshold as a candidate valley pixel; determining, with the computing system, whether a ridge is present within the imaged portion of the agricultural field based at least in part on the candidate ridge pixels; and determining, with the computing system, whether a valley is present within the imaged portion of the agricultural field based at least in part on the candidate valley pixels, generating, with the computing system, a slope-corrected depth image in which the depth image is corrected based on an estimated slope of the imaged portion of the agricultural field; calculating one or more convolutions of the slope-corrected depth image to form a reference image; and displacing a copy image of the one or more convolutions of the slope-corrected depth image from the reference image to determine a ridge orientation when a ridge is present and a valley orientation when a valley is present.
 2. The method of claim 1, wherein the pixel height of each of the plurality of pixels is derived from the slope-corrected depth image.
 3. The method of claim 1, further comprising: determining, with the computing system, a reference height based on at least a portion of the respective pixel heights of the plurality of pixels within the depth image; and defining, with the computing system, the height threshold and the depth threshold based at least in part on the reference height.
 4. The method of claim 3, wherein determining the reference height comprises: calculating an average height of the soil based at least in part on the pixel heights of the soil pixels; and calculating the reference height based at least in part on the average height of the soil.
 5. The method of claim 3, wherein determining the reference height comprises calculating the reference height based at least in part on a height associated with a predetermined percentile of the pixel heights of the soil pixels.
 6. The method of claim 3, wherein defining the height threshold comprises setting the height threshold as a summation of the reference height and a predetermined height value, and wherein defining the depth threshold comprises setting the pixel depth threshold as a differential between the reference height and a predetermined depth value.
 7. The method of claim 1, wherein determining whether a ridge is present within the imaged portion of the agricultural field comprises: determining a ridge volume associated with the candidate ridge pixels; comparing the ridge volume to a predetermined ridge volume threshold; and determining that a ridge is present within the imaged portion of the agricultural field when the ridge volume associated with the candidate ridge pixels exceeds the predetermined ridge volume threshold.
 8. The method of claim 7, further comprising, when it is determined that a ridge is present within the imaged portion of the agricultural field, displacing a target image from the depth image to determine a ridge orientation.
 9. The method of claim 1, wherein determining whether a valley is present within the imaged portion of the agricultural field comprises: determining a valley volume associated with the candidate valley pixels; comparing the valley volume to a predetermined valley volume threshold; and determining that a valley is present within the imaged portion of the agricultural field when the valley volume associated with the candidate valley pixels exceeds the predetermined valley volume threshold.
 10. The method of claim 1, wherein receiving the one or more images comprises receiving the one or more images from an imaging device supported relative to an agricultural machine.
 11. The method of claim 10, further comprising initiating, with the computing system, a control action associated with adjusting an operation of the agricultural machine based at least in part on the determination that a ridge or a valley is present within the imaged portion of the agricultural field.
 12. A system for detecting terrain variations within a field, the system comprising: an imaging device operably coupled with an agricultural machine, the imaging device configured to capture one or more images depicting an imaged portion of an agricultural field as the agricultural machine traverses the field to perform an agricultural operation, the imaged portion of the agricultural field being at least partially represented by a plurality of pixels within the one or more images; and a computing system communicatively coupled to the imaging device, the computing system including a processor and associated memory, the memory storing instructions that, when implemented by the processor, configure the computing system to: receive the one or more images from the imaging device; classify a first portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels and a second portion of the plurality of pixels that are associated with residue within the imaged portion of the agricultural field as residue pixels, each soil pixel being associated with a respective pixel height; generate a mask for the second portion of the plurality of pixels; identify each soil pixel having a pixel height that exceeds a pixel height threshold as a candidate ridge pixel; determine whether a ridge is present within the imaged portion of the agricultural field based at least in part on the candidate ridge pixels; and determine a ridge orientation when a ridge is present and a valley orientation when a valley is present.
 13. The system of claim 12, wherein: the one or more images comprise a depth image of the imaged portion of the agricultural field, with each of the plurality of pixels within the depth image being associated with a respective pixel height; and the computing system is configured to determine a reference height based on at least a portion of the respective pixel heights of the plurality of pixels within the depth image, the pixel height threshold being defined based at least in part on the reference height.
 14. The system of claim 13, wherein the computing system is configured to determine the reference height by calculating the reference height based at least in part on a height associated with a predetermined percentile of the pixel heights of the soil pixels.
 15. The system of claim 13, wherein the computing system is further configured to: determine a ridge volume associated with the candidate ridge pixels; compare the ridge volume to a predetermined ridge volume threshold; and determine that a ridge is present within the imaged portion of the agricultural field when the ridge volume associated with the candidate ridge pixels exceeds the predetermined ridge volume threshold.
 16. The system of claim 12, wherein: the computing system is further configured to initiate a control action associated with adjusting an operation of the agricultural machine based at least in part on the determination that a ridge or a valley is present within the imaged portion of the agricultural field.
 17. A system for detecting terrain variations within a field, the system comprising: an imaging device mounted to a portion of a work vehicle or an implement, the imaging device configured to capture one or more images depicting an imaged portion of an agricultural field as an agricultural machine traverses the field to perform an agricultural operation, the imaged portion of the agricultural field being at least partially represented by a plurality of pixels within the one or more images; and a computing system communicatively coupled to the imaging device, the computing system including a processor and associated memory, the memory storing instructions that, when implemented by the processor, configure the computing system to: receive the one or more images from the imaging device; classify a portion of the plurality of pixels that are associated with soil within the imaged portion of the agricultural field as soil pixels and a second portion of the plurality of pixels that are associated with residue within the imaged portion of the agricultural field as residue pixels based on image gradients within the image, each soil pixel being associated with a respective pixel height; identify each soil pixel having a pixel depth that exceeds a pixel depth threshold as a candidate valley pixel; determine whether a valley is present within the imaged portion of the agricultural field based at least in part on the candidate valley pixel; and determine a valley orientation when a valley is present.
 18. The system of claim 17, wherein the computing system is further configured to: determine a valley volume associated with the candidate valley pixels; compare the valley volume to a predetermined valley volume threshold; and determine that a valley is present within the imaged portion of the agricultural field when the valley volume associated with the candidate valley pixels exceeds the predetermined valley volume threshold. 